import React, { useRef } from 'react'

export default function App() {
  const xxxRef = useRef()
  return (
    <div>
      App
      <input type="text" ref={xxxRef} />
      <button onClick={() => {
        xxxRef.current.focus()
      }}>按钮</button>
    </div>
  )
}
